package com.io.example.demoparent.tree;

//定义BinaryTree 二叉树
class  BinaryTree{
    private HeroNode root;

    public void setRoot(HeroNode root) {
        this.root = root;
    }
    // 前序遍历
    public void preOrder(){
        if (this.root!=null){
            root.preOrder();
        }
    }

}
